﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace 算法作业
{
    class Program
    {
        static void Main(string[] args)
        {  //数学题
            for (int i = 0; i < 52; i++)
            {
                for (int j = 0; j < 52; j++)
                {
                    int a = 2 / i + 7 / 6 + j;
                    int b = 5 / i + 5 / 6 + 7 + 4 / j;
                    if( a == 52 && b == 181)
                    {
                        Console.WriteLine("\n\n\n\t答:做对四道题的有{0}人", j);
                    }
                }

            }
            Console.ReadKey();



           //公园题

            int fa, ma, bo, se;
            for(fa=0; fa<78; fa++)
            {
                for (ma = 0; ma< 78; ma++)
                {
                    for (bo = 0;bo <17; bo++)
                    {
                        for (se = 0 ; se < 17 ; se++)
                        {
                            if((fa + ma ==78 ) && (bo + se == 17) && (fa + 4 == 4 *(se + 4) ) && (ma + 4 ==3 *(bo + 4)))
                            {
                                int year = (fa - 3 *bo) /2 ;
                                Console.WriteLine("\n 答:是公元{0}年", 1998 + year);
                                Console.ReadKey();
                            }
                        }
                    }
                }
            }


        
        }
    }
}
